import 'other.n'

fn main() {
    var package = other.package_t{
        t: true,
        p: other.person_t{
            name: 'hualaka',
            age: 23,
            sex: true,
            hello: fn() {
                println("hello world")
            },
        },
    }

    // p is struct, 并且这里发生了 copy
    var p = package.p

    (&p).hello()
    (&p).age = 32
    println((&p).age)

    // (&p).set_age(25) // err: rawptr<person_t(struct)> cannot use impl call, must ptr<...>
    // package.p.set_age(25) // err: person_t(struct) cannot use impl call, must ptr<...>

    // usafe load address
    @ula(package.p).set_age(25)

    println((&p).age)
    println(p.age)
    println(package.p.age)

    // p.set_age(25) // person_t(struct) cannot use impl call, must ptr<...>
}